<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ page contentType="text/html; charset=UTF-8" %>

<div class="body">
    <s:include value="header.jsp" />
    <s:if test="%{#session.user != null}" >
        <div class="search">
            <s:form action="postQuestion">
                <textarea cols="50" rows="3" name="contentQuestion" > </textarea>
                <input type="submit" value="Đăng câu hỏi" class="search_submit" />
            </s:form>
        </div>
    </s:if>
    <div style="margin-left: 30px;">
        <p style="color: green; font-size: 20px;"><b><s:property value="user.fullname" /></b></p>
        <p>Exp trust: <s:property value="user.experienceTrust" /></p>
    </div>
    <div class="listAnswer">
        <ul>
            <s:iterator value="answers" var="a">
                <li class="answer">
                    <div class="questionTitle">
                        <a href="
                           <s:url action="viewQuestion">
                               <s:param name="q" value="#a.question.id" />
                           </s:url>
                               ">
                            <s:property value="#a.question.subject" />
                        </a>
                    </div>
                        <div class="answerTitle" style="clear: both;">
                        <s:property value="#a.content" />
                    </div>
                    <div>
                        <div style="float:left">
                            <span>
                                <i>Xếp hạng: <s:property value="#a.rate" /></i>
                            </span>
                        </div>
                    </div>
                </li>
            </s:iterator>
        </ul>
    </div>
</div>